﻿

@{
    ViewBag.Title = "Index";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

@using (Html.BeginForm("Index", "CapBacAnhChau", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-inline" }))
{
    <div id="wrapper">
        <div class="row">
            <h3 class="page-header">Cấu hình</h3>
        </div>
        <!-- /.row -->
        <div class="row">
            <div class="col-lg-12">
                <div class="panel-body">
                    <div class="dataTable_wrapper">
                        <table class="table table-striped table-bordered table-hover" id="dataTables-example">
                            <thead>
                                <tr style="font-family:'Times New Roman'">
                                    <th>STT</th>
                                    <th>Hoa Hồng</th>                               
                                    <th>Điều Kiện F1</th>
                                    <th>Tùy chọn</th>
                                </tr>
                            </thead>
                            <tbody style="font-family:'Times New Roman'">
                                @{ int j = 0;}
                                @foreach (var item in ViewBag.List)
                                {
                                    j++;
                                    <tr>
                                        <td>@j</td>                                      
                                        <td>@item.Condition</td>                                     
                                        <td>@String.Format("{0:N}", item.Commission)</td>
                                        
                                        <td>
                                            <a href="@Url.Action("UpdateCapBac", "CapBacAnhChau", new { id = item.ID })">Edit</a>                                       
                                        </td>
                                    </tr>
                                }
                            </tbody>
                        </table>                    
                    </div>
                </div>
            </div>
        </div>
    </div>

    <script>
        $(document).ready(function () {
            $('#dataTables-example').DataTable({
                responsive: true
            });
        });
        $('.Indedt').on('click', function () {
            return confirm('bạn có chắc chắn muốn xóa?');
        });
    </script>
}
